<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>双创管理系统 登录</title>
	<meta name="decorator" content="blank"/>
	<link href="${ctxStatic}/css/bootstrap.min.css" rel="stylesheet">
	<link href="${ctxStatic}/css/font-awesome.min.css" rel="stylesheet">
	<link href="${ctxStatic}/css/idenger_iconfont/iconfont.css" rel="stylesheet">
	<link href="${ctxStatic}/css/animate.min.css" rel="stylesheet">
	<link href="${ctxStatic}/css/style.min.css" rel="stylesheet">
	<link href="${ctxStatic}/css/idenger-theme.css" rel="stylesheet">
</head>
<body>
	<%--<!--[if lte IE 6]><br/><div class='alert alert-block' style="text-align:left;padding-bottom:10px;"><a class="close" data-dismiss="alert">x</a><h4>温馨提示：</h4><p>你使用的浏览器版本过低。为了获得更好的浏览体验，我们强烈建议您 <a href="http://browsehappy.com" target="_blank">升级</a> 到最新版本的IE浏览器，或者使用较新版本的 Chrome、Firefox、Safari 等。</p></div><![endif]-->--%>
	<%--<div class="header">--%>
		<%--<div id="messageBox" class="alert alert-error ${empty message ? 'hide' : ''}"><button data-dismiss="alert" class="close">×</button>--%>
			<%--<label id="loginError" class="error">${message}</label>--%>
		<%--</div>--%>
	<%--</div>--%>
	<%--<h1 class="form-signin-heading">${fns:getConfig('productName')}</h1>--%>
	<%----%>
	<%--<div class="loginWrap">--%>

	<%--<img src="${ctxStatic}/images/logo.png" width="100"  alt=""/>--%>

	<%--<h1 class="zzlTitle">${fns:getConfig('productName')}</h1>--%>

	<%--<form id="loginForm" class="form-signin" action="${ctx}/login" method="post">--%>
		<%--&lt;%&ndash;<label class="input-label" for="username">登录名</label>&ndash;%&gt;--%>
		<%--<input type="text" id="username" name="username" class="input-block-level required" value="${username}" placeholder="请输入账号">--%>
		<%--&lt;%&ndash;<label class="input-label" for="password">密码</label>&ndash;%&gt;--%>
		<%--<input type="password" id="password" name="password" class="input-block-level required" placeholder="请输入密码">--%>
		<%--<c:if test="${isValidateCodeLogin}"><div class="validateCode">--%>
			<%--<label class="input-label mid" for="validateCode">验证码</label>--%>
			<%--<sys:validateCode name="validateCode" inputCssStyle="margin-bottom:0;"/>--%>
		<%--</div></c:if>&lt;%&ndash;--%>
		<%--<label for="mobile" title="手机登录"><input type="checkbox" id="mobileLogin" name="mobileLogin" ${mobileLogin ? 'checked' : ''}/></label> &ndash;%&gt;--%>
		<%--<input class="btn btn-large btn-primary submitInput" type="submit" value="登 录"/>&nbsp;&nbsp;--%>
		<%--&lt;%&ndash;<label for="rememberMe" title="下次不需要再登录"><input type="checkbox" id="rememberMe" name="rememberMe" ${rememberMe ? 'checked' : ''}/> 记住我（公共场所慎用）</label>&ndash;%&gt;--%>
		<%--&lt;%&ndash;<div id="themeSwitch" class="dropdown">&ndash;%&gt;--%>
			<%--&lt;%&ndash;<a class="dropdown-toggle" data-toggle="dropdown" href="#">${fns:getDictLabel(cookie.theme.value,'theme','默认主题')}<b class="caret"></b></a>&ndash;%&gt;--%>
			<%--&lt;%&ndash;<ul class="dropdown-menu">&ndash;%&gt;--%>
			  <%--&lt;%&ndash;<c:forEach items="${fns:getDictList('theme')}" var="dict"><li><a href="#" onclick="location='${pageContext.request.contextPath}/theme/${dict.value}?url='+location.href">${dict.label}</a></li></c:forEach>&ndash;%&gt;--%>
			<%--&lt;%&ndash;</ul>&ndash;%&gt;--%>
			<%--&lt;%&ndash;<!--[if lte IE 6]><script type="text/javascript">$('#themeSwitch').hide();</script><![endif]-->&ndash;%&gt;--%>
		<%--&lt;%&ndash;</div>&ndash;%&gt;--%>
	<%--</form>--%>
	<%--</div>--%>

	<div class="middle-box text-center loginscreen  animated fadeInDown">
		<div>
			<div>
				<h2>欢迎双创管理系统</h2>
<%--
				<h1 class="logo-name"><img alt="image" style="margin-left: -35px;" src="${ctxStatic}/css/images/logo1.png" /></h1>
--%>

			</div>
			<%--<h3>欢迎使用协同创新发展研究中心系统</h3>--%>

			<form role="form" id="loginForm" class="form-signin m-t" action="${ctx}/login" method="post">
				<div class="form-group">
					<input type="text" id="username" name="username" class="form-control required" value="admin" placeholder="请输入账号">
				</div>
				<div class="form-group">
					<input type="password" id="password" name="password" value="admin" class="input-block-level required form-control" placeholder="请输入密码">
					<c:if test="${isValidateCodeLogin}"><div class="validateCode">
						<label class="input-label mid" for="validateCode">验证码</label>
						<sys:validateCode name="validateCode" inputCssStyle="margin-bottom:0;display:inline-block;"/>
					</div></c:if>
				</div>
				<button type="submit" class="btn btn-primary block full-width m-b" style="background: #4FB495">登 录</button>


			</form>
		</div>
	</div>

	<script src="${ctxStatic}/js/jquery.min.js"></script>
	<script src="${ctxStatic}/js/bootstrap.min.js"></script>
	<script src="${ctxStatic}/js/plugins/validate/jquery.validate.min.js"></script>
	<script src="${ctxStatic}/js/plugins/validate/messages_zh.min.js"></script>
	<script src="${ctxStatic}/js/idenger.form.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#loginForm").validate({
				rules: {
					validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
				},
				messages: {
					username: {required: "请填写用户名."},password: {required: "请填写密码."},
					validateCode: {remote: "验证码不正确.", required: "请填写验证码."}
				},
				errorLabelContainer: "#messageBox",
				errorPlacement: function(error, element) {
					error.appendTo($("#loginError").parent());
				}
			});
		});
		// 如果在框架或在对话框中，则弹出提示并跳转到首页
		if(self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0 || $('.jbox').length > 0){
			alert('未登录或登录超时。请重新登录，谢谢！');
			top.location = "${ctx}";
		}
	</script>

</html>